package pro.wxls.common.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    /**
     * 状态码
     */
    private Integer code;

    /**
     * 消息
     */
    private String msg;

    public static Result success() {
        return new Result(200, "success");
    }

    public static Result success(String msg) {
        return new Result(200, msg);
    }

    public static Result failure() {
        return new Result(500, "failure");
    }

    public static Result failure(String msg) {
        return new Result(500, msg);
    }
}
